using System.ComponentModel.DataAnnotations;

namespace DeathReportManagement.Models;

public class User
{
    public int Id { get; set; }
    
    [Required]
    [StringLength(50)]
    public string DoctorCode { get; set; } = string.Empty;
    
    [Required]
    [StringLength(100)]
    public string Name { get; set; } = string.Empty;
    
    [StringLength(100)]
    public string? Department { get; set; }
    
    [Required]
    [StringLength(20)]
    public string Role { get; set; } = "Doctor";
    
    [StringLength(255)]
    public string? Password { get; set; }
    
    public bool IsActive { get; set; } = true;
    
    public DateTime CreateTime { get; set; } = DateTime.Now;
    
    public DateTime UpdateTime { get; set; } = DateTime.Now;
    
    public ICollection<DeathReport> CreatedReports { get; set; } = new List<DeathReport>();
    public ICollection<DeathReport> UpdatedReports { get; set; } = new List<DeathReport>();
    public ICollection<DeathReport> AuditedReports { get; set; } = new List<DeathReport>();
    public ICollection<OperationLog> OperationLogs { get; set; } = new List<OperationLog>();
}